function [t,r]=euler(x0, x1, y0, n)
  h=(x1-x0)/n;
  xs=x0:h:x1;
  y1=y0;
  fprintf('\n''it x0 x1 y1');
  for i=1:n
    it=i-1;
    x0=xs(i);
    x1=xs(i+1);
    y1=y0+h*f(x0, y0);
    fprintf('\n%2.0f%10.6f%10.6f%10.6f\n',it,x0,x1,y1);
    y0=y1;
  end
  r = y0;
  fprintf('\n El punto aproximado y(x1) es = %8.6f\n',r)
  plot(xs,r,'o'),... 
  title('Euler'),... 
  xlabel('Tiempo'),ylabel('y = f(t)'),grid
